var axios = require('axios');
module.exports = {
    async HH(res, resp) {
        let msg = res.query.msg
        let text = [{ content: "", id: "LEMUR_AI_SYSTEM_SETTING", isSensitive: false, needCheck: false, role: "system" }, {content:msg,isSensitive:false,needCheck:true,role:"user"}]
        var data = JSON.stringify({ messages: JSON.stringify(text) });

        var config = {
            method: 'post',
            url: 'http://lemurchat.anfans.cn/api/chat/conversation-trial',
            headers: {
                'Content-Type': 'application/json',
                'Accept': '*/*',
                'Host': 'lemurchat.anfans.cn',
                'Connection': 'keep-alive'
            },
            data: data
        };
        let result = await axios(config)
        resp.send({ result:result.data })
    }
}